-- GENERATED SPELL FOR [Devouring Ooze] --


function spell0_1808(pUnit, Event) --@Summon Oozeling,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(12018,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_1808', 1, 1)
end

function spell1_1808(pUnit, Event) --@Summon Oozeling,Self--
pUnit:FullCastSpellOnTarget(12250,pUnit)
pUnit:RegisterEvent('Sorts_1808', 647, 1)
end

function Sorts_1808(pUnit, Event)
local choix_sorts_1808 = math.random(0, 1)
if choix_sorts_1808 == 0 then
pUnit:RegisterEvent('spell0_1808', 1, 1)
end
if choix_sorts_1808 == 1 then
pUnit:RegisterEvent('spell1_1808', 1, 1)
end
end

function mob1808_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1808', math.random(1500, 3000), 1)
end

function mob1808_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1808_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1808_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1808, 1, 'mob1808_Action')
RegisterUnitEvent(1808, 2, 'mob1808_Leave')
RegisterUnitEvent(1808, 3, 'mob1808_Kill')
RegisterUnitEvent(1808, 4, 'mob1808_Die')
